package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * 客户管理对象 gw_customer_info
 *
 * @author ruoyi
 * @date 2025-04-24
 */
public class GwCustomerInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 所属公司 */
    @Excel(name = "所属公司")
    private String companyId;

    /** 客户名称 */
    @Excel(name = "客户名称")
    @NotNull(message = "客户名称必填，限输入50个字符")
    @Length(max = 50,message = "客户名称必填，限输入50个字符")
    private String customerName;

    /** 社会信用代码 */
    @Excel(name = "社会信用代码")
    private String socialCode;

    /** 联系人 */
    @Excel(name = "联系人")
    @NotNull(message = "联系人必填，限输入20个字符")
    @Length(max = 20,message = "联系人必填，限输入20个字符")
    private String contact;

    /** 状态 */
    @Excel(name = "状态")
//    @NotNull(message = "状态必填")
    private String status;

    /** 手机号 */
    @Excel(name = "手机号")
    @NotNull(message = "手机号必填，限输入11位纯数字")
    @Length(max = 11,message = "手机号必填，限输入11位纯数字")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码必填，限输入11位纯数字")
    private String phoneNumber;

    /** 客户类型 */
    @Excel(name = "客户类型")
    @NotNull(message = "客户类型必选")
    private String customerType;

    /** 客户简介 */
    @Excel(name = "客户简介")
    @Length(max = 500, message = "客户简介选填，限输入500个字符")
    private String customerDesc;

    private List<GwContract> gwContracts;

    /** 删除标识 */
    private String delFlag;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setCompanyId(String companyId)
    {
        this.companyId = companyId;
    }

    public String getCompanyId()
    {
        return companyId;
    }

    public void setCustomerName(String customerName)
    {
        this.customerName = customerName;
    }

    public String getCustomerName()
    {
        return customerName;
    }

    public void setSocialCode(String socialCode)
    {
        this.socialCode = socialCode;
    }

    public String getSocialCode()
    {
        return socialCode;
    }

    public void setContact(String contact)
    {
        this.contact = contact;
    }

    public String getContact()
    {
        return contact;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setPhoneNumber(String phoneNumber)
    {
        this.phoneNumber = phoneNumber;
    }

    public String getPhoneNumber()
    {
        return phoneNumber;
    }

    public void setCustomerType(String customerType)
    {
        this.customerType = customerType;
    }

    public String getCustomerType()
    {
        return customerType;
    }

    public void setCustomerDesc(String customerDesc)
    {
        this.customerDesc = customerDesc;
    }

    public String getCustomerDesc()
    {
        return customerDesc;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public List<GwContract> getGwContracts() {
        return gwContracts;
    }

    public void setGwContracts(List<GwContract> gwContracts) {
        this.gwContracts = gwContracts;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("companyId", getCompanyId())
            .append("gwContracts", getGwContracts())
            .append("customerName", getCustomerName())
            .append("socialCode", getSocialCode())
            .append("contact", getContact())
            .append("status", getStatus())
            .append("phoneNumber", getPhoneNumber())
            .append("customerType", getCustomerType())
            .append("customerDesc", getCustomerDesc())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
